package com.ocom.mqsimple.business.card.impl;


import com.alibaba.fastjson.JSON;
import com.ocom.common.vo.webapi.ImportCardVo;
import com.ocom.mqsimple.business.card.ProvideCardProductService;
import com.ocom.mqsimple.utils.ProvideCardProductUitl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class ProvideCardProductServiceImpl implements ProvideCardProductService {
	private final Logger log = LoggerFactory.getLogger(ProvideCardProductServiceImpl.class);

	@Autowired
	private ProvideCardProductUitl provideCardProductUitl;

	/**
	 * 处理人员图片
	 */
	public void handle(ImportCardVo importCardVo) {

		log.info(" ProvideCard-mq-开始【{}】",importCardVo);
		//消息队列调用减库存接口  优先级越高越先执行完

        String msg = JSON.toJSONString(importCardVo);
		provideCardProductUitl.provideCardSend(msg,15);

        log.info(" ProvideCard-mq-完成【{}】",msg);

	}

}
